#include "stdafx.h"

#include "PipeController.h"
// #include "SocketConnector.h"
#include "PacketAnalyzer.h"
#include "TradeAgentClientDLL.h"
#include <stdio.h>



EXTERN_C
{
	TRADEAGENTCLIENTDLL_API int __stdcall InitSocket()
	{
		PipeInit();
		printf("InitSocket.\n");

		return 0;
	}
	TRADEAGENTCLIENTDLL_API int __stdcall CloseSocket()
	{
		printf("CloseConnection \n");
		PipeClose();

		return 0;
	}

	TRADEAGENTCLIENTDLL_API int __stdcall GetPacket(PacketReaderHandle *handle)
	{
		int ret = PipeGetPacket(handle);
		// Get packet
		return ret;
	}

	TRADEAGENTCLIENTDLL_API int __stdcall SendPacket(PacketWriterHandle handle)
	{
		int ret = PipeSendPacket(handle);
		return ret;
	}
}